module RList where

import Data.List (List(..), (:))

data RList a = RCons (RList a) a | RNil

infixl 6 RCons as :>

revToList :: forall a. RList a -> List a
revToList rl = go rl Nil
  where
  go RNil l = l
  go (xs :> x) l = go xs (x : l)
